


data4.4<-read.csv("C:\\Users\\Administrator\\Desktop\\data3.2.csv",head=TRUE)
data4.4
lm4.4<-lm(y~x1+x2,data=data4.4)
summary(lm4.4)
e<-resid(lm4.4)
e
abse<-abs(e)
abse
cor.test(data4.4$x1,abse,method="spearman")
cor.test(data4.4$x2,abse,method="spearman")

m<-seq(1,5,0.5)
m
result1<-vector(length=9,mode="list")
result2<-vector(length=9,mode="list")
for (j in 1:9)
 {w<-data4.4$x2^(-m[j])
 lm4<-lm(y~x1+x2,weights=w,data4.4)
 result1[[j]]<-logLik(lm4)
 result2[[j]]<-summary(lm4)}
result1
result2
